package company.tx;

import java.util.Scanner;

public class Tx1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        StringBuffer ans = new StringBuffer();
        for (int i = 0; i < n; i++) {
            int num = sc.nextInt();
            if (i + 1 != k)
                ans.append(num).append(" ");
        }
        System.out.println(ans);
    }
}
